package com.cq.school.entity;

import org.apache.commons.lang3.builder.ToStringBuilder;

import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.MappedSuperclass;
import java.io.Serializable;

/**
 * Created with IntelliJ IDEA.
 * User: huke
 * Date: 13-11-27
 * Time: 下午10:35
 * To change this template use File | Settings | File Templates.
 */
@MappedSuperclass
public abstract class IdEntity {
    protected Long id;

    	@Id
    	@GeneratedValue(strategy = GenerationType.IDENTITY)
    	public Long getId() {
    		return id;
    	}

    	public void setId(Long id) {
    		this.id = id;
    	}
}
